package com.example.springmvc.controller;

import com.example.springmvc.domain.Message;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWorldController {

    @RequestMapping("/hello/{player}")
    public Message hello(@PathVariable String player) {
        Message msg = new Message(player, "Hello " + player);
        return msg;
    }

}